<template>
	<div class="">

		<div class="zzc" v-if="showzzc" @click="close"></div>
		<div class="container">
			<div class="title">资产列表</div>
			<div class="search_box flb">
				<div class="search_box" style="flex-wrap: wrap;">

					<input type="text" autocomplete="off" v-model="zcnum" class="form-control search_inp"
						placeholder="输入资产编码">
					<input type="text" autocomplete="off" v-model="zcname" class="form-control search_inp"
						placeholder="输入名称">
					<el-select v-model="zcvalue" placeholder="资产类型" @change="page=1">
						<el-option v-for="item in zctype" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select>
					<el-select v-model="ppvalue" placeholder="品牌" @change="page=1">
						<el-option v-for="item in pplist" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select>
					<input type="text" autocomplete="off" v-model="specification" class="form-control search_inp"
						placeholder="输入规格/型号">

					<input type="text" autocomplete="off" v-model="supplier" class="form-control search_inp"
						placeholder="输入供应商">
					<input type="text" autocomplete="off" v-model="uname" class="form-control search_inp"
						placeholder="输入使用人">

					<!-- <div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
						<input type="text" class="form-control" v-model="uname" placeholder="使用人">

						<img src="@assets/images/close.png" class="clears" alt="" v-if="uname"
							@click="uname = '';suserid=''">
						<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
							@click="utype='search';openuseralert()"></span>
					</div> -->

					<el-date-picker prefix-icon='none' style="width: 120px;margin-left: 10px;margin-bottom: 20px;"
						v-model="createStartDate" type="date" @change="changedate(1)" value-format="timestamp"
						placeholder="开始日期">
					</el-date-picker>
					<el-date-picker prefix-icon='none' style="width: 120px;margin-left: 10px;margin-bottom: 20px;"
						v-model="createEndDate" type="date" @change="changedate(2)" value-format="timestamp"
						placeholder="结束日期">
					</el-date-picker>

					<el-select v-model="bgvalue" placeholder="是否变更" @change="page=1">
						<el-option v-for="item in bglist" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select>

					<div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
						<input type="text" class="form-control" readonly v-model="departname" placeholder="所属科室">

						<img src="@assets/images/close.png" class="clears" alt="" v-if="departname"
							@click="departname = '';departId=''">
						<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
							@click="utype='search';alert_show2=!alert_show2;"></span>
					</div>


					<div class="sea_btn sear_btns" @click="search()" style="margin-bottom: 20px;">
						<img src="@assets/images/search.png" alt="">
						查询
					</div>

					<div class="add_btn sear_btns" @click="openadd" style="margin-bottom: 20px;"
						v-if="$permissions.indexOf(130)  != -1">
						<img src="@assets/images/add.png" alt="">
						新增
					</div>
					<el-dropdown v-if="$permissions.indexOf(134)  != -1" style="margin-bottom: 20px;margin-left: 7px;">
						<el-button type="primary" size="small">
							导入<i class="el-icon-arrow-down el-icon--right"></i>
						</el-button>
						<el-dropdown-menu slot="dropdown">
							<el-dropdown-item>
								<el-upload class="upload-demo" :action="$url+'/sys/excel/zc/import'"
									:before-upload="beforeUpload2" :headers="{'Authorization':token}"
									:on-success="handleChange" :show-file-list="false" accept=".xls,.xlsx">
									导入资产信息
								</el-upload>
							</el-dropdown-item>
							<el-dropdown-item>
								<el-upload class="upload-demo" :action="$url+'/sys/excel/importZc'"
									:before-upload="beforeUpload2" :headers="{'Authorization':token}"
									:on-success="handleChange" :show-file-list="false" accept=".xls,.xlsx">
									导入终端机器
								</el-upload>
							</el-dropdown-item>
						</el-dropdown-menu>
					</el-dropdown>
					<el-dropdown v-if="$permissions.indexOf(135)  != -1" style="margin-bottom: 20px;margin-left: 7px;"
						@command="handleCommand">
						<el-button type="warning" size="small">
							导出<i class="el-icon-arrow-down el-icon--right"></i>
						</el-button>
						<el-dropdown-menu slot="dropdown">
							<el-dropdown-item command="a" style="padding: 0 20px;">导出资产信息</el-dropdown-item>
							<el-dropdown-item command="b" style="padding: 0 20px;">导出资产模板</el-dropdown-item>
						</el-dropdown-menu>
					</el-dropdown>

					<div class="down_btn sear_btns" style="background-color: #7BABF8;margin-bottom: 20px;"
						v-if="$permissions.indexOf(203)  != -1" @click="chosexj">
						<img src="@assets/images/xmadd.png" alt="">
						加入巡检
					</div>
					<div class="add_btn sear_btns" style="margin-bottom: 20px;" v-if="$permissions.indexOf(268)  != -1"
						@click="moreprint">
						<img src="@assets/images/logout-rounded.png" alt="">
						批量打印
					</div>
				</div>
			</div>
			<div class="table-responsive">
				<h2 class="tcent" v-if="list.length ==0">暂时没有数据</h2>
				<table class="table table-hover" v-else>
					<tr>
						<th style="width: 50px;">
							<input type="checkbox" autocomplete="off" @change="changeall" v-model="choseall"
								name="adepart" id="adepart"><label for="adepart"></label>
						</th>
						<th>资产编码</th>
						<th>名称</th>
						<th>资产类型</th>
						<th>品牌</th>
						<th>规格/型号</th>
						<!-- <th>供应商</th> -->
						<th>使用人</th>
						<th>所属科室</th>
						<th>详细地点</th>
						<th>二维码打印时间</th>
						<th class="tcent">操作</th>
					</tr>
					<tr v-for="item,index in list">
						<td style="width: 50px;">
							<input type="checkbox" v-model="item.chosesf" @change="chosechange" name="adepart"
								:id="'adepart'+item.id"><label :for="'adepart'+item.id"></label>
						</td>
						<td>{{item.zcCode}}</td>
						<td style="max-width: 300px;">{{item.zcName}}</td>
						<td>{{item.zcTypeName}}</td>
						<td>{{item.zcBrandName}}</td>
						<td>{{item.zcMode}}</td>
						<!-- <td>{{item.provider}}</td> -->
						<td>{{item.responsibleName}}</td>
						<td>{{item.deptName}}</td>
						<td>{{item.area}}</td>
						<td>{{item.lastTimePrint}}</td>
						<td class="tcent">
							<a href="javascript:;" class="btn-blue btns" @click="id=item.id;getinfo()">查看</a>
							<a href="javascript:;" class="btn-green btns" @click="edit(index,'bg')"
								v-if="$permissions.indexOf(132)  != -1">申请变更</a>
							<!-- <a href="javascript:;" class="btn-gray btns" @click="delopen(item.id)">删除</a> -->
							<!-- v-if="$permissions.indexOf(133)  != -1 || $permissions.indexOf(132)  != -1" -->
							<a href="#" class="more">
								<el-popover width="150" trigger="click" v-model="item.static"
									@hide="item.static=false;$forceUpdate()" @show="item.static=true;$forceUpdate()">
									<div class="more_box" slot="reference">
										<img v-if="!item.static" src="../../assets/images/more_before.png" alt="">
										<img v-else src="../../assets/images/more_after.png" alt="">
									</div>

									<!-- <div class="downs" v-if="item.static" style="width: 155px;"> -->
									<div class="down_li" @click="checklist(item.id)">变更记录</div>
									<div class="down_li" @click="edit(index,'edit')"
										v-if="$permissions.indexOf(203)  != -1">编辑</div>
									<div class="down_li" @click="delopen(item.id)"
										v-if="$permissions.indexOf(133)  != -1">删除</div>
									<div class="down_li" @click="reprovebf(item.id)"
										v-if="$permissions.indexOf(132)  != -1">申请报废</div>
									<div class="down_li" @click="print(item)" v-if="$permissions.indexOf(268)  != -1">
										打印二维码
									</div>
									<!-- </div> -->
								</el-popover>


							</a>
						</td>
					</tr>

				</table>

				<div class="page_box">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:current-page="page" :page-sizes="[10, 30, 60, 100]" :page-size="limit"
						layout="total, sizes, prev, pager, next, jumper" :total="inglen">
					</el-pagination>
				</div>

			</div>
			<!-- <div class="blackzzc" v-show="tabshow">
				<div class="tablealert" id="printDiv">
					<vueEasyPrint ref="easyPrint" tableShow>
						<div v-for="item,index in codes" class="pintpage">
							<QrCode :id="'QrCode'+index" :width="500" :height="500" style="width: 500px;height: 500px;" :text="item" />
						</div>
					</vueEasyPrint>
				</div>
			</div> -->
		</div>
		<!--选择科室弹窗-->
		<div :class="alert_show2?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="alert_show2?'display: block;z-index:200':''">
			<div class="cent w600"
				style="justify-content: center;width: 600px;height: calc(100% - 312px);margin: 156px auto;">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>选择科室
							<div class="right" @click="alert_show2=false;roomsearch = '';getallrooms()">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="height: calc(100vh - 500px);">
							<div class="search">
								<div class="form-group" style="display: flex;padding-right: 0;">
									<input class="form-control" autocomplete="off" @keydown.enter="getallrooms"
										placeholder="输入关键字" v-model="roomsearch">

									<div style="margin-left: 10px;" class="btn btn-success" @click="getallrooms">
										<span class="iconfont icon-chaxun"
											style="line-height: 34px;vertical-align: baseline;"></span>
									</div>
								</div>
							</div>
							<div class="treelist" v-if="roomsearch">
								<div v-if="allrooms.length > 0">
									<div class="li" v-for="item in allrooms" @click="sear_choserome(item)">
										{{item.name}}
									</div>
								</div>
								<h2 class="tcent" v-else>搜索不到该内容</h2>
							</div>
							<div class="zTreeDemoBackground left"
								:style="roomsearch==''?'display:block':'display:none'">
								<ul id="treeDemo" class="ztree" @select="choseroom"></ul>
							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary"
								@click="alert_show2=false;roomsearch = '';getallrooms()">确定</button>
							<button class="btn btn-info"
								@click="alert_show2=false;roomsearch = '';getallrooms()">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--资产详情-->
		<div :class="showinfo?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showinfo?'display: block;z-index:199;':'z-index:199;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 700px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>资产详情
							<div class="right" @click="showinfo=false;activeName='first'">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 656px;">
							<el-tabs v-model="activeName">
								<el-tab-pane label="基本信息" name="first">
									<div class="sublist">
										<div class="subli">
											<div class="subli_left">
												<label class="subl">名称：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.zcName" :title="info.zcName">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">资产类型：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.zcTypeName" :title="info.zcTypeName">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">品牌：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.zcBrandName" :title="info.zcBrandName">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">规格/型号：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.zcMode" :title="info.zcMode">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">供应商：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.provider" :title="info.provider">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">使用人：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.responsibleName" :title="info.responsibleName">
												</div>
											</div>
										</div>
										<div class="subli">
											<div class="subli_left">
												<label class="subl">所属科室：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly
														v-model="info.deptName" :title="info.deptName">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">详细地点：</label>
												<div class="input-cont">
													<input type="text" class="form-control" readonly v-model="info.area"
														:title="info.area">
												</div>
											</div>
										</div>

									</div>
								</el-tab-pane>
								<el-tab-pane label="计算机信息" name="second">
									<div class="sublist">
										<div class="subli">
											<div class="subli_left">
												<label class="subl">计算机名</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcName"
														readonly :title="info.pcName">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">操作系统</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcOperationSystem" readonly
														:title="info.pcOperationSystem">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">IP地址</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcIp" readonly
														:title="info.pcIp">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">mac地址</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcMac"
														readonly :title="info.pcMac">
												</div>
											</div>


										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">主板</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcMainBoard"
														readonly :title="info.pcMainBoard">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">CPU</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCpu"
														readonly :title="info.pcCpu">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">内存</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcInternalStorage" readonly
														:title="info.pcInternalStorage">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">硬盘</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCaliche"
														readonly :title="info.pcCaliche">
												</div>
											</div>

										</div>

										<div class="subli">

											<div class="subli_left">
												<label class="subl">显卡</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcVideoCard"
														readonly :title="info.pcVideoCard">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">硬盘大小</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcCalicheCapacity" readonly
														:title="info.pcCalicheCapacity">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">网卡</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcNetworkCard"
														readonly :title="info.pcNetworkCard">
												</div>
											</div>

											<div class="subli_left">
												<label class="subl">硬盘序列号</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcCalicheNumber" readonly
														:title="info.pcCalicheNumber">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">序列号</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcSerialNumber" readonly
														:title="info.pcSerialNumber">
												</div>
											</div>

											<div class="subli_left">
												<label class="subl">BIOS信息</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcBiosInfo"
														readonly :title="info.pcBiosInfo">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">屏幕分辨率</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcResolution"
														readonly :title="info.pcResolution">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">打印设备</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcPrintEquipment" readonly
														:title="info.pcPrintEquipment">
												</div>
											</div>

										</div>

										<div class="subli">

											<div class="subli_left">
												<label class="subl">生产日期</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCreateDate"
														readonly :title="info.pcCreateDate">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">光驱</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCdDriver"
														readonly :title="info.pcCdDriver">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">串口设备</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.pcSerialPortEquipment" readonly
														:title="info.pcSerialPortEquipment">
												</div>
											</div>
										</div>
									</div>
								</el-tab-pane>
							</el-tabs>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--新增-->
		<div :class="showadd?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showadd?'display: block;z-index:199;':'z-index:199;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 700px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>{{info.id?edittype=='bg'?'申请变更':'编辑资产':'新建资产'}}
							<div class="right" @click="showadd=false;activeName='first'">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 590px;">
							<el-tabs v-model="activeName">
								<el-tab-pane label="基本信息" name="first">
									<div class="sublist">
										<div class="subli">
											<div class="subli_left">
												<label class="subl"><em class="red">*</em>名称</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.zcName"
														:readonly="edittype=='bg'?true:false" placeholder="输入资产名称">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl"><em class="red">*</em>资产类型</label>
												<el-select v-model="info.zcType" placeholder="资产类型"
													:disabled="edittype=='bg'?true:false">
													<el-option v-for="item in zctypeadd" :key="item.id"
														:label="item.name" :value="item.id">
													</el-option>
												</el-select>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">品牌</label>
												<el-select v-model="info.zcBrand" placeholder="品牌"
													:disabled="edittype=='bg'?true:false">
													<el-option v-for="item in pplistadd" :key="item.id"
														:label="item.name" :value="item.id">
													</el-option>
												</el-select>
											</div>
											<div class="subli_left">
												<label class="subl">规格/型号</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.zcMode"
														:readonly="edittype=='bg'?true:false" placeholder="输入规格/型号">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">供应商</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.provider"
														:readonly="edittype=='bg'?true:false" placeholder="输入供应商">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">使用人</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														v-model="info.responsibleName" placeholder="输入使用人">
													<!-- <el-autocomplete popper-class="my-autocomplete"
														:trigger-on-focus="false" v-model="username"
														value-key="realName" :fetch-suggestions="querySearch_u"
														placeholder="请选择使用人" @select="handleSelect_u">
														<template slot-scope="{ item }">
															<div class="tab_tr">
																<div class="tab_td">{{ item.userName }}</div>
																<div class="tab_td">{{ item.realName }}</div>
																<div class="tab_td">{{ item.departName }}</div>
																<div class="tab_td">{{ item.phoneNo }}</div>
															</div>

														</template>
													</el-autocomplete>
													<span class="iconfont icon-list"
														@click="utype='add';openuseralert()"></span> -->
												</div>
											</div>
										</div>
										<div class="subli">
											<div class="subli_left">
												<label class="subl"><em class="red">*</em>所属科室</label>
												<div class="input-cont">
													<el-autocomplete popper-class="my-autocomplete"
														@change="info.departId = '';isclick1=false" v-model="dname"
														value-key="name" :fetch-suggestions="querySearch_d"
														placeholder="请选择内容" @select="handleSelect_d">
														<!-- <i class="el-icon-edit el-input__icon" slot="suffix"
																	@click="handleIconClicdk">
																</i> -->
														<template slot-scope="{ item }">
															<div class="tab_tr" :title="item.name">
																<div class="tab_td" style="width: 50%;">
																	{{ item.name }}
																</div>
																<div class="tab_td" style="width: 50%;">
																	{{ item.address }}
																</div>
															</div>

														</template>
													</el-autocomplete>
													<span class="iconfont icon-list" data-toggle="modal"
														data-target="#keshi"
														@click="utype='add';alert_show2=!alert_show2;getrooms()"></span>
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">详细地点</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.area"
														placeholder="输入详细地点">
												</div>
											</div>
										</div>
										<div class="subli" v-if="edittype=='bg'">
											<div class="subli_left" style="width: 100%;align-items: flex-start;">
												<label class="subl">变更备注</label>
												<div class="input-cont">
													<textarea v-model="info.remark" placeholder="输入变更备注"></textarea>
												</div>
											</div>
										</div>

									</div>
								</el-tab-pane>
								<el-tab-pane label="计算机信息" name="second">
									<div class="sublist">
										<div class="subli">
											<div class="subli_left">
												<label class="subl">计算机名</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcName"
														:readonly="edittype=='bg'?true:false" placeholder="输入计算机名">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">操作系统</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcOperationSystem" placeholder="输入操作系统">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">IP地址</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcIp"
														:readonly="edittype=='bg'?true:false" placeholder="输入IP地址">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">mac地址</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcMac"
														:readonly="edittype=='bg'?true:false" placeholder="输入mac地址">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">主板</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcMainBoard"
														:readonly="edittype=='bg'?true:false" placeholder="输入主板">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">CPU</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCpu"
														:readonly="edittype=='bg'?true:false" placeholder="输入CPU">
												</div>
											</div>

										</div>
										<div class="subli">

											<div class="subli_left">
												<label class="subl">内存</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcInternalStorage" placeholder="输入内存">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">硬盘</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCaliche"
														:readonly="edittype=='bg'?true:false" placeholder="输入硬盘">
												</div>
											</div>
										</div>
										<div class="subli">
											<div class="subli_left">
												<label class="subl">显卡</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcVideoCard"
														:readonly="edittype=='bg'?true:false" placeholder="输入显卡">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">硬盘大小</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcCalicheCapacity" placeholder="输入硬盘大小">
												</div>
											</div>

										</div>


										<div class="subli">
											<div class="subli_left">
												<label class="subl">网卡</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcNetworkCard"
														:readonly="edittype=='bg'?true:false" placeholder="输入网卡">
												</div>
											</div>

											<div class="subli_left">
												<label class="subl">硬盘序列号</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcCalicheNumber" placeholder="输入硬盘序列号">
												</div>
											</div>

										</div>



										<div class="subli">
											<div class="subli_left">
												<label class="subl">序列号</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcSerialNumber" placeholder="输入序列号">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">BIOS信息</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcBiosInfo"
														:readonly="edittype=='bg'?true:false" placeholder="输入BIOS信息">
												</div>
											</div>
										</div>


										<div class="subli">
											<div class="subli_left">
												<label class="subl">屏幕分辨率</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcResolution"
														:readonly="edittype=='bg'?true:false" placeholder="输入屏幕分辨率">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">打印设备</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcPrintEquipment" placeholder="输入打印设备">
												</div>
											</div>
										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">生产日期</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCreateDate"
														:readonly="edittype=='bg'?true:false" placeholder="输入生产日期">
												</div>
											</div>
											<div class="subli_left">
												<label class="subl">光驱</label>
												<div class="input-cont">
													<input type="text" class="form-control" v-model="info.pcCdDriver"
														:readonly="edittype=='bg'?true:false" placeholder="输入光驱">
												</div>
											</div>

										</div>

										<div class="subli">
											<div class="subli_left">
												<label class="subl">串口设备</label>
												<div class="input-cont">
													<input type="text" class="form-control"
														:readonly="edittype=='bg'?true:false"
														v-model="info.pcSerialPortEquipment" placeholder="输入串口设备">
												</div>
											</div>


										</div>
									</div>
								</el-tab-pane>
							</el-tabs>

						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="showData">确定</button>
							<button class="btn btn-info close_eng" @click="showadd=false;activeName='first'">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="alzzc" v-if="showbf">
			<div class="del_alert" style="width: 750px;height: 650px;">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>报废报告
					<div class="right" @click="closebf">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info bfalert">
					<div class="bfli">
						<div class="bfli_l">申请人：</div>
						<div class="bfli_r">
							<!-- <input type="text" v-model="createName"> -->
							<div class="input-cont">
								<input type="text" class="form-control" v-model="createName" readonly
									placeholder="输入申请人">
							</div>
						</div>
					</div>
					<div class="bfli">
						<div class="bfli_l"><em class="red">*</em>说明：</div>
						<div class="bfli_r">
							<textarea name="" id="" v-model="uselessDescription" maxlength="1000"></textarea>
							<div class="snum">{{uselessDescription.length}}/1000</div>
						</div>
					</div>
					<div class="bfli">
						<div class="bfli_l">照片：</div>
						<div class="bfli_r">
							<el-upload :data="{project:'zc'}" :headers="{'Authorization':token}"
								accept="image/png, image/jpeg,image/jpg,image/webp" :action="$url+'/file/upload'"
								:show-file-list="false" :file-list="fileList3" :before-upload="beforeUpload"
								:on-success="uploadsuc3" :multiple="true" :limit="5" :on-exceed="max"
								:auto-upload="true" :list-type="files3.length < 5?'picture-card':''">
								<i class="el-icon-plus" v-if="files3.length < 5"></i>
							</el-upload>
							<div class="file" v-for="item,index in files3">
								<img class="el-upload-list__item-thumbnail" :src="$url+item" alt=""
									@click="handlePictureCardPreview($url+item)">
								<i class="el-icon-delete" @click="del_file3(index)"></i>

							</div>

						</div>
					</div>

				</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="setbf">确认</div>
					<div class="alert_close" @click="closebf">取消</div>
				</div>
			</div>
		</div>

		<div class="alzzc" v-if="delalert">
			<div class="del_alert">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>信息
					<div class="right" @click="delalert=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info">确认要删除选中的这条数据吗？</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="del">确认</div>
					<div class="alert_close" @click="delalert=false">取消</div>
				</div>
			</div>
		</div>

		<!--报修人-->
		<div :class="user_alert?'modal in fade':'modal fade'" role="dialog"
			:style="user_alert?' align-items: center;justify-content: center;display: flex;z-index:200;':'z-index:200'"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">
						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closeusertalert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100"
							style="overflow-x: hidden;overflow-y:scroll;height:760px;max-height:calc(100vh - 150px)">

							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo4" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;">
										<h2 class="tcent" v-if="user_all.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in user_all">
												<td>
													<input type="radio" v-model="userid" :value="item.id"
														@change="changechose(item.id,item.realName,item.phoneNo)"
														name="chose2" :id="'c'+item.id"><label
														:for="'c'+item.id"></label>
												</td>
												<td>{{item.userName}}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" :page-count="num2" layout="prev, pager, next">
										</el-pagination>
									</div>


									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="sure_user">确定</button>&emsp;
										<button class="btn btn-default" @click="closeusertalert">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="alzzc" v-if="showprint">
			<div class="del_alert" style="width: 800px;height: 546px;">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>打印预览
					<div class="right" @click="showprint=false;printlist=[];codes=[]">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info bfalert" style="padding: 0 30px;height:400px">

					<vueEasyPrint ref="easyPrint" tableShow>
						<div class="pintpage" v-for="item,index in codes">
							<div class="codeleft">
								<div class="num" style="font-size: 24px;">{{title}}</div>
								<QrCode :id="'QrCode'+index" width="300" height="300"
									style="width: 300px;height: 300px;" :text="item.url" />
								<div class="num">资产编码：{{item.num}}</div>
							</div>
							<div class="coderight">
								<div class="zcname">资产名称：{{printlist[index].name}}</div>
								<div class="zcname">资产品牌：{{printlist[index].brand}}</div>
								<div class="zcname">资产型号：{{printlist[index].model}}</div>
								<div class="zcname">使用部门：{{printlist[index].derp}}</div>
								<div class="zcname" v-if="printlist[index].date">生产日期：{{printlist[index].date}}</div>
							</div>
						</div>
					</vueEasyPrint>
				</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="doprint">打印</div>
					<div class="alert_close" @click="showprint=false;printlist=[];codes=[]">取消</div>
				</div>
			</div>
		</div>

		<el-dialog :visible.sync="dialogVisible">
			<img width="100%" :src="dialogImageUrl" alt="">
		</el-dialog>
		<div class="alzzc" v-if="showbglist">
			<div class="del_alert" style="width: 900px;height: 650px;">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>变更记录
					<div class="right" @click="showbglist=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info bfalert" style="padding: 0 30px;height:570px">

					<table style="width: 100%;">
						<tr>
							<table style="width: 100%;">
								<tr>
									<th style="width: 100px;text-align: center;">属性</th>
									<th style="width: 100px;text-align: center;">更新前</th>
									<th style="width: 100px;text-align: center;">更新后</th>
									<th style="width: 100px;text-align: center;">修改人</th>
									<th style="width: 100px;text-align: center;">时间</th>
									<th style="width: 150px;text-align: center;">备注</th>
									<th style="width: 100px;text-align: center;">审核人</th>
									<th style="width: 100px;text-align: center;">审核时间</th>
								</tr>
							</table>
						</tr>
						<tr v-for="item in bglist2" class="nob">
							<td class="nob">
								<table style="width: 100%;">
									<tr v-for="item2,index2 in item.list">
										<td style="width: 100px;">{{item2.zcField}}</td>
										<td style="width: 100px;">{{item2.oldValue}}</td>
										<td style="width: 100px;">{{item2.newValue}}</td>
										<td :rowspan="item.list.length" style="width: 100px;"
											v-if="item.list.length==1 || index2==0">
											{{item.createName}}
										</td>
										<td style="width: 100px;" :rowspan="item.list.length"
											v-if="item.list.length==1 || index2==0">
											{{item.createDate}}
										</td>
										<td style="width: 150px;" :rowspan="item.list.length"
											v-if="item.list.length==1 || index2==0">{{item.remark}}</td>
										<td :rowspan="item.list.length" v-if="item.list.length==1 || index2==0">
											{{item.agreeName}}
										</td>
										<td style="width: 100px;" :rowspan="item.list.length"
											v-if="item.list.length==1 || index2==0">{{item.agreeDate}}</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</div>
				<!-- <div class="alert_btns">
					<div class="alert_sure" @click="down2">导出</div>
					<div class="alert_close" @click="showbglist=false">取消</div>
				</div> -->
			</div>
		</div>
		<div class="loading-content" v-if="showloading">
			<div class="loading-spinner">
				<svg viewBox="25 25 50 50" class="circular">
					<circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
				</svg>
			</div>
			<div class="loading-text">加载中...</div>
		</div>
	</div>
</template>

<script type="text/babel">
	import $ from 'jquery'
	import QrCode from '../../components/qrcode.vue'
	import vueEasyPrint from "vue-easy-print"
	export default {
		name: "",
		components: { QrCode,vueEasyPrint },
		data() {
			return {
				// zcinfo:{},
				options5:[
					{
						name: '导入资产信息',
						id: 1
					},
					{
						name: '导入终端机器',
						id: 2
					},
				],
				options6:[
					{
						name: '导出资产信息',
						id: 1
					},
					{
						name: '导出资产模板',
						id: 2
					},
				],
				codes:[],
				showprint:false,
				showbglist:false,
				bglist2:[],
				bgvalue:0,
				bglist:[
					{
						name: '全部状态',
						id: 0
					},
					{
						name: '已变更',
						id: 1
					},
					{
						name: '未变更',
						id: 2
					},
				],
				activeName:"first",
				  dialogImageUrl: '',
				        dialogVisible: false,
				        disabled: false,
						codeUrl:"",
				codes: [],
				files3id: [],
				files3: [],
				fileList3: [],
				options: [],
				bfnum:0,
				edittype:"",
				value:"",
				values:"",
				zcvalue:"",
				zcvalues:"",
				ppvalue:"",
				ppvalues:"",
				zcnum:"",
				zcnums:"",
				createName: sessionStorage.getItem('realName'),
				zcname:"",
				zcnames:"",
				suppliers:"",
				supplier:"",
				specifications:"",
				specification:"",
				suserids:"",
				suserid:"",
				uname:"",
				unames:"",
				createStartDates:"",
				createStartDate:"",
				createEndDates:"",
				createEndDate:"",
				
				userid:"",
				roomsearch:"",
				departname:"",
				username:"",
				dname:"",
				uid:"",
				user:"",
				showbf:false,
				isclick1:false,
			
				setting: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom
					}
				},
				zNodes: [],
				word_user:"",
				word_users:"",
				
				doalert:false,
				alert_show2:false,
				
				choseall:false,
				utype:"",
				alert_enger: false,
				showadd: false,
				
				showzzc: false,
				cuserlist: [],
				zNodes_u: [],
				ztree_obj_u: {},
				treeClickCount4: 0,
				treeClickCount: 0,
				setting_u: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom_user
					}
				},
				page: 1,
				page2: 1,
				list: [],
				inglen: 0,
				inglen2: 0,
				limit: 10,
				limit2: 10,
				num: 1,
				num2: 1,
				info: {},
				showinfo: false,
				showloading: false,
				user_alert: false,
				alert_show: false,
				user_all:[],
				pplistadd:[],
				pplist:[],
				zctypeadd:[],
				zctype:[],
				printlist:[],
				
				title:'',
				delnum:'',
				departId:'',
				departIds:'',
				uselessDescription:'',
				uselessEnclosure:'',
				delalert:false,
				tabshow:false,
			}
		},
		
		created() {
			this.$http.defaults.headers["Authorization"] = sessionStorage.getItem('token')
			this.token = sessionStorage.getItem('token')
		},
		mounted() {
			this.getallrooms();
			this.getrooms();
			this.getpp();
			this.gettype();
			this.getlist();
			this.gettitle();
		},
		watch:{
			roomsearch:{
					handler(newValue,oldValue){
					if(newValue == ''){
						
					}else{
						this.getallrooms();
					}
				}
			},
		},
		beforeRouteEnter(to, from, next) { //路由导航钩子，通过页面路由标记是否需要清空页面数据重新加载
		    to.meta['fromPath'] = from.path;
			to.meta['needFresh'] = false;
		    
		    next();
		  },
		activated(){
			
		},
		methods: {
			handleCommand(e){
				if(e=='a'){
					this.down()
				}else{
					this.down2()
				}
			},
			reprovebf(id){
				this.id=id;
				this.showbf=true
				var that = this
				setTimeout(function(){
					for (var i = 0; i < that.list.length; i++) {
						that.list[i].static=false
					}
					that.$forceUpdate()
				},10)
			},
			doprint(){
				this.showloading = true
				var that = this
				var ids=''
				for (var i = 0; i < this.printlist.length; i++) {
					ids = ids+''+this.printlist[i].id+','
				}
				ids = ids.substring(0,ids.length-1)
				var param = {
					ids:ids
				}
				this.$http.post(this.$url + '/zc/updatePrintDate', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.showloading =false
						that.$refs.easyPrint.print()
						that.getlist()
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
				
				
			},
			gettitle(){
				var that = this
				that.$http.get(this.$url + '/zc/printWord/title/select')
					.then(function(response) {
						console.log(response.data.data)
						that.title = response.data.msg
						
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			print(item){
				this.printlist=[]
				this.codes=[]
				this.showprint = true
				var that = this
				setTimeout(function(){
					for (var i = 0; i < that.list.length; i++) {
						that.list[i].static=false
					}
					that.$forceUpdate()
				},10)
				this.printlist[0]={
					id:item.id,
					name:item.zcName,
					brand:item.zcBrandName,
					model:item.zcMode,
					derp:item.deptName,
					date:item.pcCreateDate
				}
				var url = this.$url.replace(/\/gd$/, '')
				this.codes[0]={
					url:url+'/gdmobile/wecom.html?scan=3&rou=qrcode&SNUM='+ item.zcCode+'#/ding',
					num:item.zcCode
				}
			},
			// 获取巡检记录
			checklist(id){
				var param = {
					id:id
				}
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/zc/historyInfo', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						// that.$Toast(response.data.msg);
						that.bglist2 = response.data.data.list
						that.showbglist = true
						that.showloading = false
						for (var i = 0; i < that.list.length; i++) {
							that.list[i].static=false
						}
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			changeall(){
				if(this.choseall){
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = true
					}
				}else{
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = false
					}
				}
			},
			chosechange(){
				for (var i = 0; i < this.list.length; i++) {
					if(this.list[i].chosesf == true){
						this.choseall=true
					}else{
						this.choseall=false
						break
					}
					
				}
			},
			down2(){
				this.showloading=true
				var that = this
				this.$http.get(this.$url + '/sys/excel/zc/download',{responseType:"blob"})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast('导出成功！');
						const blob = new Blob([response.data]);
						      const fileName ='资产模板.xlsx';
						      if ("download" in document.createElement("a")) {
						        // 非IE下载
						        const elink = document.createElement("a");
						        elink.download = fileName;
						        elink.style.display = "none";
						        elink.href = URL.createObjectURL(blob);
						        document.body.appendChild(elink);
						        elink.click();
						        URL.revokeObjectURL(elink.href); // 释放URL 对象
						        document.body.removeChild(elink);
								that.showloading=false
						      } else {
						        // IE10+下载
						        navigator.msSaveBlob(blob, fileName);
								that.showloading=false
						      }
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			down(){
				this.showloading=true
				var that = this
				this.$http.get(this.$url + '/sys/excel/zc/export?zcStatus=0',{responseType:"blob"})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast('导出成功！');
						const blob = new Blob([response.data]);
						      const fileName ='资产信息.xlsx';
						      if ("download" in document.createElement("a")) {
						        // 非IE下载
						        const elink = document.createElement("a");
						        elink.download = fileName;
						        elink.style.display = "none";
						        elink.href = URL.createObjectURL(blob);
						        document.body.appendChild(elink);
						        elink.click();
						        URL.revokeObjectURL(elink.href); // 释放URL 对象
						        document.body.removeChild(elink);
								that.showloading=false
						      } else {
						        // IE10+下载
						        navigator.msSaveBlob(blob, fileName);
								that.showloading=false
						      }
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			// 点击更多
			open(index) {
				if(this.list[index].static==false){
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].static=false
					}
					this.list[index].static = true
					this.showzzc=true
					
					this.$forceUpdate()
				}else{
					this.list[index].static = false
					this.showzzc=false
				}
				
				this.$forceUpdate()
			},
			handleChange(e){
				console.log(e)
				this.showloading=false
				this.page=1
				this.getlist(this.parentId)
				this.$emit('getnew', '123');
				this.$Toast(e.msg);
			},
	
			 handlePictureCardPreview(file) {
			        this.dialogImageUrl = file
			        this.dialogVisible = true
			      },
			max(){
				this.$Toast('最多可上传5张图片');
			},
			del_file3(i){
				var that = this
				var param = {fileId:this.files3id[i]}
				this.$http.post(this.$url + '/main/delete/file', this.$qs.stringify(param))
					.then(function(response) {
						console.log(response)
							that.files3.splice(i,1)
							that.files3id.splice(i,1)
						that.fileList3.splice(i,1)
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			uploadsuc3(file, fileList){
				if(file.code != 0){
					this.$Toast(file.msg)
					this.showloading=false
					return
				}
				// console.log(file)
				 this.files3.push(file.data.relativePath)
				 this.files3id.push(file.data.id)
				 this.showloading=false
			},
			beforeUpload(e){
				if(this.fileList3.length >= 5){
					this.$Toast('最多可上传5张图片');
				}
				this.showloading=true
				const fd = new FormData();
				 fd.append("file", e);
				 fd.append("project", 'zc');
				 fd.append("secret", this.$md5(e.name + 'gd' + e.size));
				
				var that = this
				this.$http.post(this.$url + '/file/upload', fd, {
						headers: {
							'Content-Type': 'multipart/form-data; boundary=something'
						}
					})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						if(response.data.code != 0){
							that.$Toast(response.data.msg)
							that.showloading=false
							return
						}
						that.files3.push(response.data.data.relativePath)
						that.files3id.push(response.data.data.id)
						that.showloading=false
					})
					.catch(function(error) {
						console.log(error);
					});
					
				return false
			},
			beforeUpload2(e){
				this.showloading=true
				// const fd = new FormData();
				//  fd.append("file", e);
				//  fd.append("project", 'zc');
				//  fd.append("secret", this.$md5(e.name + 'gd' + e.size));
				
				// var that = this
				// this.$http.post(this.$url + '/sys/excel/zc/import', fd, {
				// 		headers: {
				// 			'Content-Type': 'multipart/form-data; boundary=something'
				// 		}
				// 	})
				// 	.then(function(response) {
				// 		if (response.data.code == '1410') {
				// 			that.$Toast(response.data.msg);
				// 			sessionStorage.setItem('token', '')
				// 			that.$router.push('/login')
				// 			return
				// 		}
				// 		if(response.data.code != 0){
				// 			that.$Toast(response.data.msg)
				// 			that.showloading=false
				// 			return
				// 		}
				// 		that.showloading=false
				// 		that.page=1
				// 		that.getlist(that.parentId)
				// 		that.$emit('getnew', '123');
				// 		that.$Toast(e.msg);
				// 	})
				// 	.catch(function(error) {
				// 		console.log(error);
				// 	});
					
				// return false
			},
			beforeUpload3(e){
				this.showloading=true
				const fd = new FormData();
				 fd.append("file", e);
				 fd.append("project", 'zc');
				 fd.append("secret", this.$md5(e.name + 'gd' + e.size));
				
				var that = this
				this.$http.post(this.$url + '/sys/excel/importZc', fd, {
						headers: {
							'Content-Type': 'multipart/form-data; boundary=something'
						}
					})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						if(response.data.code != 0){
							that.$Toast(response.data.msg)
							that.showloading=false
							return
						}
						that.showloading=false
						that.page=1
						that.getlist(that.parentId)
						that.$emit('getnew', '123');
						that.$Toast(e.msg);
					})
					.catch(function(error) {
						console.log(error);
					});
					
				return false
			},
			changedate(ty) {
				if (!this.createStartDate && !this.createEndDate && this.createStartDate > this.createEndDate) {
					this.$Toast('选择的结束日期在开始日期之前');
					if (ty == 1) {
						this.createStartDate = ''
					} else {
						this.createEndDate = ''
					}
					return
				}
			},
			search(){
				this.zcnames = this.zcname
				this.zcnums = this.zcnum
				this.zcvalues = this.zcvalue
				this.ppvalues = this.ppvalue
				this.bgvalues = this.bgvalue
				this.suppliers = this.supplier
				this.unames = this.uname
				this.suserids = this.suserid
				this.createStartDates = this.createStartDate
				this.createEndDates = this.createEndDate
				this.departIds = this.departId
				this.specifications = this.specification
				this.page = 1
				this.getlist()
			},
			querySearch_d(queryString, cb) {
				var that = this
				var url = encodeURI(this.$url + '/sys/dept/select?name='+this.roomsearch)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.allrooms = response.data.data
						var restaurants_d = that.allrooms;
						var results = queryString ? restaurants_d.filter(that.createFilter_d(queryString)) : restaurants_d;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({name:"暂无内容",address:""})
						}else{
							if(results[0].id){
								results.unshift({name:"科室",address:"地址"})
							}
						}
						
						cb(results);
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			   
			},
			createFilter_d(queryString) {
				return (restaurant) => {
					// console.log(restaurant.name)
					return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					
				};
			},
			handleSelect_d(item) {
				if(!item.id){
					this.dname=''
					return 
				}
				this.dname = item.name
				this.info.deptId = item.id
				this.info.area = item.address
				this.isclick1=true
				
			},
			// 科室树状图选择
			choseroom(data, node, treeNode) {
				this.treeClickCount++;
				if (this.treeClickCount >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount == 1) {
						this.treeClickCount = 0;
						console.log('单击事件,可在此处理对应逻辑')
						if(this.utype == 'search'){
							this.departId = treeNode.id
							this.departname = treeNode.name
						}else{
							this.info.deptId = treeNode.id
							this.dname=treeNode.name
							this.info.area = treeNode.address
							this.isclick1=true
						}
						
					} else if (this.treeClickCount > 1) {
						this.treeClickCount = 0;
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			sear_choserome(item) {
				
				
				if(this.utype == 'search'){
					this.departname=item.name
					this.departId=item.id
				}else{
					this.info.deptId=item.id
					this.dname=item.name
					this.info.area = item.address
					this.isclick1=true
				}
				
				this.roomsearch=item.name
				this.getallrooms()
			},
			closebf(){
				this.fileList3 = []
				this.files3 = []
				this.files3id = []
				this.uselessDescription = ''
				this.id = ''
				this.showbf=false
			},
			setbf(){
				if(this.uselessDescription.trim() == ''){
					this.$Toast("请填写报废说明");
					return
				}
				var param = {
					id:this.id,
					uselessEnclosure:this.files3id.join(','),
					uselessDescription:this.uselessDescription,
					createName:this.createName
				}
				var that = this
				this.$http.post(this.$url + '/zc/zcUseless', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.page=1
						that.id = ''
						that.showbf = false
						that.fileList3 = []
						that.files3 = []
						that.files3id = []
						that.uselessDescription = ''
						that.createName = ''
						that.getlist()
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			handleCurrentChange2(val) {
			  console.log(`当前页: ${val}`);
								this.page2 = val
								this.getalluserlist()
			},
			
			closealert(){
				
				this.choseall2=false
				this.alert_show=false;
				// this.user_c = []
				// this.cname = []
				// this.cnames = []
				this.word_user = ''
				this.word_users = ''
				this.deptId = ''
				this.did = ''
				this.getrooms()
				this.ztree_obj_u.cancelSelectedNode();
				this.getalluserlist()
			},
			moreprint(){
				this.printlist=[]
				this.codes=[]
				var num = 0
				var url = this.$url.replace(/\/gd$/, '')
				for (var i = 0; i < this.list.length; i++) {
					if(this.list[i].chosesf==true){
						this.printlist[i] = {
							id:this.list[i].id,
							name:this.list[i].zcName,
							brand:this.list[i].zcBrandName,
							model:this.list[i].zcMode,
							derp:this.list[i].deptName
						}
						this.codes[i] = {
							url:url+'/gdmobile/wecom.html?scan=3&rou=qrcode&SNUM='+ this.list[i].zcCode+'#/ding',
							num:this.list[i].zcCode
						}
						num++
					}
				}
				if(num==0){
					this.$Toast('暂无选中');
					return
				}
				
				this.showprint = true
				var that = this
			
			
			},
			// 加入巡检
			chosexj(id){
				var ids=''
				var num = 0
				if(id>0){
					num = 1
					this.ids = id
				}else{
				// this.ids = id
				// this.delalert=true	
					var ids=''
					var num = 0
					for (var i = 0; i < this.list.length; i++) {
						if(this.list[i].chosesf==true){
							ids = ids+''+this.list[i].id+','
							num++
						}
					}
					this.ids = ids.substring(0,ids.length-1)
					if(this.ids==''){
						this.$Toast('暂无选中');
						return
					}
				}
				this.delnum = num
				var that = this
				this.$confirm('确认将'+num+'条资产数据加入巡检？')
				          .then(_ => {
							  var param = {
							  	ids:that.ids
							  }
							  that.$http.post(that.$url + '/zc/toXj', that.$qs.stringify(param))
							  	.then(function(response) {
							  		if (response.data.code == '1410') {
							  			that.$Toast(response.data.msg);
							  			sessionStorage.setItem('token', '')
							  			that.$router.push('/login')
							  			return
							  		}
							  		that.$Toast(response.data.msg);
							  		that.page=1
									that.choseall=false
							  		that.getlist()
							  		
							  	})
							  	.catch(function(error) {
							  		console.log(error);
							  		that.$Toast('网络拥堵，刷新一下');
							  	});
				})
				.catch(_ => {});
			},
			
			delopen(id){
				this.ids = id
				this.delalert=true	
				var that = this
				setTimeout(function(){
					for (var i = 0; i < that.list.length; i++) {
						that.list[i].static=false
					}
					that.$forceUpdate()
				},10)
					
			},
			// 删除
			del(){
				this.delalert=false
				var param = {
					ids:this.ids
				}
				var that = this
				this.$http.post(this.$url + '/zc/delete', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.page=1
						that.getlist()
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			
			
			changechose(id,name,tel){
				if(this.utype == 'search'){
					this.uname = name
					this.uid = id
				}else if(this.utype == 'add'){
					this.username = name
					this.info.responsibleId = id
				}
			},
			sure_user(){
				
				this.user_alert = false
			},
			closeusertalert(){
				this.user_alert = false
				this.username = ''
				this.$forceUpdate()
				// this.uname = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
			},
			openuseralert(){
				this.page2 = 1
				this.username = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
				this.user_alert = true
			},
			// 获取弹窗里的用户
			getalluserlist() {
				this.choseall2 = false
				
				var id = this.did?this.did:''
				var that = this
				var url = encodeURI(this.$url + '/sys/user/list?page='+this.page2+'&limit='+this.limit2+'&deptId='+id+'&userName='+this.word_users)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.user_all = response.data.data.records
						that.cuserlist = response.data.data.records
						for (var i = 0; i < that.user_all.length; i++) {
							that.user_all[i].id = window.atob(that.user_all[i].id)
							that.cuserlist[i].id = that.user_all[i].id
						}
						if(that.utype == 'addsp'){
							var a = 0
							for (var i = 0; i < that.cuserlist.length; i++) {
								console.log(that.user_c.indexOf(that.cuserlist[i].id))
								if(that.user_c.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
							
						}else if(that.utype == 'addcs'){
							var a = 0
							for (var i = 0; i < that.cuserlist.length; i++) {
								if(that.user_c2.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
						}
						if(a == that.cuserlist.length){
							that.choseall2=true
						}else{
							that.choseall2=false
						}
						that.inglen2 = response.data.data.total
						if (that.inglen2 > that.limit2) {
							that.num2 = response.data.data.pages
						} else {
							that.num2 = 1
						}
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
					});
			},
			// 科室树状图选择
			choseroom_user(data, node, treeNode) {
				this.treeClickCount4++;
				if (this.treeClickCount4 >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount4 == 1) {
						this.treeClickCount4 = 0;
						console.log('单击事件,可在此处理对应逻辑')
							
								this.did = treeNode.id
							this.page2=1
							this.getalluserlist()
						
					} else if (this.treeClickCount4 > 1) {
						this.treeClickCount4 = 0;
						
						this.ztree_obj_u.cancelSelectedNode();
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			// 获取全部科室
			getallrooms() {
				var that = this
				var url = encodeURI(this.$url + '/sys/dept/select?name=' + this.roomsearch)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.allrooms = response.data.data
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
					});
			},
			// 获取科室
			getrooms() {
				var param = {
					parentId: 0
				}
				var that = this
				this.$http.post(this.$url + '/sys/dept/tree', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zNodes = response.data.data
						that.ztree_obj = $.fn.zTree.init($("#treeDemo"), that.setting, that.zNodes);
						var  nodes = that.ztree_obj.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj.expandNode(nodes[i],  true ,  false ,  true );
						}
						that.zNodes_u = response.data.data
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo4"), that.setting_u, that.zNodes_u);
						 var  nodes = that.ztree_obj_u.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj_u.expandNode(nodes[i],  true ,  false ,  true );
						}
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			
			handleSelect_u(item) {
				// if(!item.id){
				// 	this.info.responsibleId=''
				// 	return 
				// }
				this.username = item.realName
				this.info.responsibleId = item.id				
			},
			
			querySearch_u(queryString, cb) {
				var that = this
				var name = this.info.commitUserName?this.info.commitUserName:''
				var id = this.info.departId?this.info.departId:''
				var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.restaurants_u = response.data.data
						that.restaurants_u.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
						var restaurants_u = that.restaurants_u;
						var results = queryString ? restaurants_u.filter(that.createFilter_u(queryString)) : restaurants_u;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({userName:"暂无内容",realName:"",departName:"",phoneNo:""})
						}else{
							if(results[0].id){
								results.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
							}
						}
						
						cb(results);
						// console.log(that.restaurants)
					})
					.catch(function(error) {
						console.log(error);						
						that.$Toast('网络拥堵，刷新一下');
					});
					
			  
			},
			createFilter_u(queryString) {
				return (restaurant) => {
					// if(restaurant.realName){
						return (restaurant.realName.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					// }
				};
			},
			openadd(){
				this.showadd=true
				this.info = {}
				this.username = ''
				this.edittype = ''
				this.dname = ''
				this.type = 'add'
			},
			
			getinfo(){
				var param = {
					id:this.id
				}
				var that = this
				this.$http.post(this.$url + '/zc/detail', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.info = response.data.data
						that.showinfo = true
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			
			edit(index,type){
				this.type = 'edit'
				var param = {
					id:this.list[index].id
				}
				var that = this
				this.edittype = type
						
				this.$http.post(this.$url + '/zc/detail', this.$qs.stringify(param))
					.then(function(response) {
						that.$http.get(that.$url + '/zc/zcUpdateDate?id='+that.list[index].id)
							.then(function(response2) {
								if (response.data.code == '1410') {
									that.$Toast(response.data.msg);
									sessionStorage.setItem('token', '')
									that.$router.push('/login')
									return
								}
								
								that.info = {
									id :response.data.data.id,
									zcCode :response.data.data.zcCode,
									zcName :response.data.data.zcName,
									zcType :response.data.data.zcType,
									zcBrand :response.data.data.zcBrand,
									zcMode :response.data.data.zcMode,
									provider :response.data.data.provider,
									
									responsibleId :response.data.data.responsibleId,
									deptId :response.data.data.deptId,
									area :response.data.data.area,
									pcMainBoard :response.data.data.pcMainBoard,
									pcVideoCard :response.data.data.pcVideoCard,
									pcCaliche :response.data.data.pcCaliche,
									pcCalicheNumber :response.data.data.pcCalicheNumber,
									pcCalicheCapacity :response.data.data.pcCalicheCapacity,
									pcPrintEquipment :response.data.data.pcPrintEquipment,
									pcCreateDate :response.data.data.pcCreateDate,
									pcName :response.data.data.pcName,
									pcCpu :response.data.data.pcCpu,
									pcInternalStorage :response.data.data.pcInternalStorage,
									pcNetworkCard :response.data.data.pcNetworkCard,
									pcSerialPortEquipment :response.data.data.pcSerialPortEquipment,
									pcCdDriver :response.data.data.pcCdDriver,
									pcBiosInfo :response.data.data.pcBiosInfo,
									pcResolution :response.data.data.pcResolution,
									pcIp :response.data.data.pcIp,
									pcMac :response.data.data.pcMac,
									pcOperationSystem :response.data.data.pcOperationSystem,
									pcSerialNumber :response.data.data.pcSerialNumber,
									updateDate : response2.data
								}
								that.username = response.data.data.responsibleName
								that.dname = response.data.data.deptName
								if(type == 'bg'){
									that.info.responsibleId = ''
									that.info.responsibleName = ''
									that.info.deptId = ''
									that.info.area = ''
									that.username = ''
									that.dname = ''
								}
								
								if(that.info.deptId){
									that.isclick1=true
								}
								that.showloading = false
								for (var i = 0; i < that.list.length; i++) {
									that.list[i].static=false
								}
								that.$forceUpdate()
							})
							.catch(function(error) {
								console.log(error);
								that.$Toast('网络拥堵，刷新一下');
							});
						
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						
						that.$Toast('网络拥堵，刷新一下');
					});
				
				this.showadd = true
			},
			
			closeadd(){
				this.showadd = false;
				
				this.info =  {}
			},
			
			handleCurrentChange2(val) {
				this.page2 = val
				this.getalluserlist()
			},
			 handleSizeChange(val) {
				this.limit = val
				this.choseall = false
				this.getlist()
			},
			handleCurrentChange(val) {
				this.page = val
				this.choseall = false
				this.getlist()
			},
			
			// 表单提交
			showData() {				
				this.info.zcName = this.info.zcName?this.info.zcName:''
				this.info.zcMode = this.info.zcMode?this.info.zcMode:''
				this.info.area = this.info.area?this.info.area:''
				this.info.provider = this.info.provider?this.info.provider:''
				this.info.comeFrom = 0
				if (this.info.zcName.trim() == '' || this.info.zcType == '' || this.info.deptId == '') {
					this.$Toast("请填写必填选项");
					return
				}
				if(!this.isclick1 ){
					this.$Toast("请点击选择所属科室");
					return false;
				}
				console.log(this.info)
				if(this.edittype != 'edit'){
				 
				          
						  this.showloading = true
						  var that = this
						  this.$http.post(this.$url + '/zc/save', this.$qs.stringify(this.info))
						  	.then(function(response) {
						  		if (response.data.code == '1410') {
						  			that.$Toast(response.data.msg);
						  			sessionStorage.setItem('token', '')
						  			that.$router.push('/login')
						  			return
						  		}
						  		that.$Toast(response.data.msg);
						  		that.showadd = false
						  		that.showloading = false
						  		that.activeName='first'
						  		that.edittype=''
						  		that.info =  {}
						  
						  		that.getlist()
						  	})
						  	.catch(function(error) {
						  		that.$Toast('网络拥堵，刷新一下');
						  	});
				}else{
					this.showloading = true
					var that = this
					this.$http.post(this.$url + '/zc/update', this.$qs.stringify(this.info))
						.then(function(response) {
							if (response.data.code == '1410') {
								that.$Toast(response.data.msg);
								sessionStorage.setItem('token', '')
								that.$router.push('/login')
								return
							}
							that.$Toast(response.data.msg);
							that.showadd = false
							that.showloading = false
							that.activeName='first'
							that.info =  {}
							that.edittype=''
							that.getlist()
						})
						.catch(function(error) {
							that.$Toast('网络拥堵，刷新一下');
						});
				}
				
			},
			
			// 点击遮罩层
			close(){
				this.options_show=false
				this.showzzc=false
			
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].static=false
					}
					this.showzzc=false
			},
			
			//显示当前时间（年月日时分秒）
			timeFormate(timeStamp) {
			      let year = new Date(timeStamp).getFullYear();
			      let month =new Date(timeStamp).getMonth() + 1 < 10? "0" + (new Date(timeStamp).getMonth() + 1): new Date(timeStamp).getMonth() + 1;
			      let date =new Date(timeStamp).getDate() < 10? "0" + new Date(timeStamp).getDate(): new Date(timeStamp).getDate();
				  let hh =new Date(timeStamp).getHours() < 10? "0" + new Date(timeStamp).getHours(): new Date(timeStamp).getHours();
				  let mm =new Date(timeStamp).getMinutes() < 10? "0" + new Date(timeStamp).getMinutes(): new Date(timeStamp).getMinutes();
				  let ss =new Date(timeStamp).getSeconds() < 10? "0" + new Date(timeStamp).getSeconds(): new Date(timeStamp).getSeconds();
				   // +" "+" "+hh+":"+mm+':'+ss  
			    return year + "-" + month + "-" + date;
			},
			getpp() {
				var that = this
				this.$http.get(this.$url + '/zc/brand/select')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.pplistadd = response.data.data
						that.pplist = response.data.data
						that.pplist.unshift({'name':'全部品牌',id:''})
						
						if(that.pplistadd[0].name == '全部品牌'){
							that.pplistadd = that.pplistadd.slice(1)
						}
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			gettype() {
				var that = this
				this.$http.get(this.$url + '/zc/types/select')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zctype = response.data.data
						that.zctype.unshift({'name':'全部类型',id:''})
						
						that.zctypeadd =response.data.data
						if(that.zctypeadd[0].name == '全部类型'){
							that.zctypeadd = that.zctypeadd.slice(1)
						}
						// console.log(response.data.data)
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			getlist() {
				this.showloading = true
				var that = this
				var param = {
					zcStatus:0,
					page:this.page,
					limit:this.limit,
					zcName:this.zcnames,
					zcCode:this.zcnums,
					zcType:this.zcvalues,
					zcBrand:this.ppvalues,
					zcMode:this.specifications,
					provider:this.suppliers,
					isChange:this.bgvalues,
					responsibleName:this.unames,
					beginDate:this.createStartDates?this.timeFormate(this.createStartDates):'',
					finishDate:this.createEndDates?this.timeFormate(this.createEndDates):'',
					deptId:this.departIds,
				}
				this.$http.post(this.$url + '/zc/selectList', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.list = response.data.data
						for (var i = 0; i < that.list.length; i++) {
							that.list[i].static = false
							that.list[i].chosesf = false
						}
						that.choseall = false
						that.inglen = response.data.count
						that.$forceUpdate()
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});

			},
		},

		computed: {},
	}
</script>
<style lang='less' scoped>
	.upload-demo /deep/ .el-upload {
		padding: 0 20px;
	}

	/deep/ .el-dropdown-menu__item {
		padding: 0;
	}

	.el-button--small {
		font-size: 14px;
	}

	.uploads {
		color: #606266;
		font-weight: normal;
	}

	.coderight {
		display: flex;
		justify-content: space-around;
		flex-direction: column;
		height: 100%;
		padding: 40px 0;
	}

	.codeleft {
		margin-right: 30px;
	}

	.num {
		font-size: 20px;
		text-align: center;
	}

	.zcname {
		font-size: 20px;
		text-align: left;
		/* margin: 18px 0; */
	}

	.nob {
		border-bottom: none !important;
		padding: 0 !important;
	}

	.form-control[disabled],
	.form-control[readonly],
	fieldset[disabled] .form-control {
		background-color: #fff;
	}

	.table-responsive {
		height: calc(100vh - 270px);
	}

	.el-upload-list__item-thumbnail {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.pintpage:nth-last-of-type(1) {
		border-bottom: none;
	}

	.pintpage {
		page-break-after: always;
		display: flex;
		justify-content: center;
		align-items: center;
		/* flex-direction: column; */
		width: 100%;
		/* height: 100%; */
		height: 388px;
		/* border-bottom: 1px solid #ccc; */
	}

	.el-icon-delete {
		position: absolute;
		right: 5px;
		top: 5px;
		z-index: 20;
	}

	/deep/ .el-upload--picture-card {
		margin-right: 20px;
	}

	.bfli_l {
		width: 100px;
	}

	.bfli_r textarea {
		height: 130px;
		margin-top: 0 !important;
		box-sizing: border-box;
	}

	.snum {
		position: absolute;
		bottom: 0px;
		right: 15px;
		font-size: 12px;
	}

	.bfli_r {
		display: flex;
		flex-wrap: wrap;
		width: 600px;
		position: relative;
	}

	.file {
		background-color: #fbfdff;
		border: 1px dashed #c0ccda;
		border-radius: 6px;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
		width: 148px;
		height: 148px;
		cursor: pointer;
		line-height: 146px;
		vertical-align: top;
		margin-right: 20px;
		margin-bottom: 20px;
		position: relative;
	}

	.flb {
		justify-content: space-between;
		align-items: flex-start;
	}

	.bfalert {
		height: 480px;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.bfli {
		display: flex;
		padding: 0 30px;
		margin-bottom: 20px;
	}

	.alert_btns {
		margin-top: 20px;
	}

	.nosys:hover .temenu {
		display: block;
	}

	.temli {
		height: 35px;
		line-height: 35px;
		cursor: pointer;
	}

	.temenu {
		position: absolute;
		background: #fff;
		box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
		width: 100px;
		top: 30px;
		border-radius: 5px;
		padding: 5px 0;
		display: none;
		z-index: 2;
	}

	.nosys {
		position: relative;
		display: flex;
		justify-content: center;
		width: 72px;
		margin: 0 auto;
	}

	.title {
		font-size: 24px;
		color: #000000;
	}

	.alert_info textarea {
		width: 100%;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		padding: 5px 10px;
		outline: none;
		margin-top: 10px;
		margin-bottom: -10px;
	}

	.task_li {
		display: flex;
		/* align-items: center; */
		margin-bottom: 20px;

	}

	.task_r textarea {
		width: 271px;
		height: 129px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		padding: 5px 10px;
		outline: none;
	}

	.task_l {
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #000000;
		line-height: 34px;
	}

	.flexbox img {
		width: 18px;
		margin-left: 6px;
	}

	.flexbox {
		display: flex;
		align-items: center;
	}

	.rwname {
		font-size: 18px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #4286F5;
		width: 228px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.task_sp_bto {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 67px;
	}

	.task_pass {
		width: 76px;
		height: 34px;
		background: #32B16C;
		border-radius: 6px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 34px;
		margin-left: 19px;
		cursor: pointer;
	}

	.task_th {
		width: 76px;
		height: 34px;
		background: #EC6941;
		border-radius: 6px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 34px;
		cursor: pointer;
	}

	.task_sp_no {
		font-size: 16px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #4286F5;
	}

	.task_sp_top {
		border-bottom: 1px solid #dce6fc;
		height: 80px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.task_sp_name {
		width: 48px;
		height: 48px;
		background: #4286F5;
		border-radius: 100%;
		font-size: 16px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		margin-right: 13px;
	}

	.task_sp {
		width: 357px;
		height: 148px;
		background: #F1F4FD;
		border-radius: 6px;
		padding: 0 14px;
		margin-bottom: 30px;
	}

	.task_left {
		width: 50%;
		height: calc(100vh - 103px);
		overflow-y: scroll;
		padding: 35px 32px;
		overflow-x: hidden;
	}

	.task_box_title {
		display: flex;
		align-items: center;
		font-size: 20px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		margin-bottom: 10px;
		color: #000000;
	}

	.task_box {
		display: flex;
		align-items: stretch;
	}

	.task_cur {
		width: 9px;
		height: 9px;
		background: #D2D2D2;
		border-radius: 50%;
		margin-right: 10px;
	}

	.ri_li {
		display: flex;
		align-items: center;
		padding: 11px 20px;
		cursor: pointer;
	}

	.ri_li img {
		margin-right: 8px;
	}

	.rightmenu {
		position: absolute;
		width: 130px;
		height: 119px;
		background: #FFFFFF;
		/* border: 1px solid #D2D2D2; */
		box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.1);
		right: 0;
		padding-top: 7px;
	}

	.taskinfo_box {
		/* width: 865px; */
		animation: test .3s;
		width: 0;
		height: calc(100vh - 50px);
		background: #fff;
		box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.2);

	}

	@keyframes test2 {
		0% {
			width: 846px;
		}

		100% {
			width: 0;
		}
	}

	@keyframes test {
		0% {
			width: 0;
		}

		100% {
			width: 846px;
		}
	}

	.tx {
		animation: test .3s;
		width: 865px;
	}

	.tx2 {
		animation: test2 .3s;
		width: 0;
	}

	.task_info_title_right {
		position: relative;
	}

	.task_info_title_right img {
		width: 18px;
	}

	.task_info_title_left {
		width: 100px;
		height: 34px;
		background: #3574DA;
		border-radius: 17px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

	.task_zzc {
		width: 846px;
		height: 100vh;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		position: fixed;
		padding-top: 50px;
		top: 0;
		/* left: 0; */
		right: 0;
		z-index: 5;
	}

	.taskinfo_title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20px;
		background: #f7f7f7;
		height: 53px;
	}

	.rwadd {
		height: 20px;
		line-height: 20px;
		padding-right: 8px;
		border-right: 1px solid #fff;
		margin-right: 13px;
	}

	.rw {
		width: 120px;
		margin-bottom: 20px;
		background-color: #409eff;
		border-radius: 34px;
	}

	.btnsele {
		border: none;
		margin-bottom: 0 !important;

		margin-left: 0 !important;
	}

	.rw .btnsele /deep/ .el-input .el-select__caret {
		color: #fff;
		position: relative;
		left: 10px;
	}

	.rw .btnsele /deep/ .el-input__inner {
		width: 10px;
		border: none;
		padding: 0;
		background: transparent;
		color: transparent;
		/* height: 0; */
	}

	/* 
	.rw img {
		height: 13px;
		width: 13px;
		margin-right: 3px;
	} */

	.input-cont:hover .clears {
		display: block;
	}

	.clears {
		width: 10px;
		position: absolute;
		right: 35px;
		top: 14px;
		display: none;
		cursor: pointer;
	}

	.sublia {
		display: flex;

	}

	.subli textarea {
		width: 673px;
		height: 200px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		outline: none;
		padding: 10px 10px;
	}

	.subli /deep/ .el-date-editor--date .el-input__inner,
	.subli /deep/ .el-date-editor.el-input,
	.el-date-editor.el-input__inner {
		width: 271px !important;
	}

	.subl {
		width: 100px;
		text-align: right;
		margin-right: 17px;
		line-height: 34px;
	}

	.subli /deep/ .el-input__prefix,
	.task_r /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	.subli input,
	.subli .el-select {
		width: 271px;
		margin-left: 0;
	}

	.subli /deep/ .el-input__inner {
		height: 34px;
	}

	.subli label {
		margin-bottom: 0;
	}

	.sublist {
		padding-top: 15px;
	}

	.subli_left {
		display: flex;
		align-items: center;
		width: 50%;
	}

	.subli {
		display: flex;
		align-items: center;
		color: #000;
		margin-bottom: 15px;
		justify-content: space-between;
	}

	/deep/ .el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	/deep/ .el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	/deep/ .el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.numslen {
		position: absolute;
		bottom: 0px;
		right: 50px;
		font-size: 12px;
	}

	/deep/ .el-input--prefix .el-input__inner {
		height: 34px;
		padding: 0 8px;
	}

	/deep/ .el-date-editor--date .el-input__inner {
		width: 120px !important;
	}

	.search_box /deep/ .el-input__inner {
		width: 110px;
		height: 34px;
		/* background: #F6F6F6; */
		border: 1px solid #CCCCCC;
		/* box-shadow: 0px 2px 0px 0px #EEEEEE; */
		border-radius: 5px;
	}

	/deep/ .el-input__icon {
		line-height: 34px;
	}


	.el-select {
		margin-left: 10px;
	}

	.search_box .el-select {
		margin-bottom: 20px;
	}

	.form-group .el-select {
		margin-left: 0px
	}

	.el-input__icon {
		line-height: 34px;
	}

	.el-input__inner {
		height: 34px;
		width: 110px;
		/* margin-left: 10px; */
	}

	.el-upload__input {
		bottom: 35px;
	}


	.btns {
		min-width: 72px;
		padding: 0 8px !important;
		width: auto !important;
	}


	.options {
		z-index: 40001;
	}

	.down_li {
		cursor: pointer;
	}

	.down_li:hover {
		background: #4286f5;
		color: #fff;
	}


	.modal-lg .modal-body.h100 {
		height: calc(100vh - 130px);
	}

	.el-input--prefix .el-input__inner {
		padding-left: 12px;
		padding-right: 12px;
	}

	.search_inp {
		/* width: 260px; */
		width: 115px;
		margin-left: 10px;
		margin-bottom: 20px;
	}

	.mb0,
	.mb0 .form-group {
		margin-bottom: 15px;
	}


	.btn-primary:hover {
		color: #fff !important;
		background: #4286f5 !important;
		border: none;
	}

	.btn-primary {
		outline: none !important;
		color: #fff !important;
		background: #4286f5 !important;
		margin-right: 18px;
	}

	.close_eng:hover {
		color: #434343 !important;
		background: #EEEEEE !important;
		border: none;
	}

	.close_eng {
		border: none;
		color: #434343 !important;
		background: #EEEEEE !important;
		outline: none !important;
	}

	.el-autocomplete {
		width: 271px;
	}

	.el-autocomplete-suggestion li.highlighted,
	.el-autocomplete-suggestion li:hover {
		background-color: #ddd;
	}

	.el-popper {
		margin-top: 0;
		margin-right: 0;
	}

	/* 	.el-scrollbar__wrap > .rws {
		margin-left: -34px;
		margin-right: 0;
	} */

	.my-autocomplete {
		border-radius: 0 0 6px 6px;
		min-width: 400px;
		margin-top: 0 !important;


		.popper__arrow {
			display: none;
		}

		.el-scrollbar__wrap {
			padding: 0 !important;
			overflow-x: scroll;

			li {
				padding: 0 !important;
				min-width: 320px;
			}

		}

	}

	.tab_td {
		width: 25%;
		min-width: 80px;
		display: inline-block;
		padding: 0 10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.el-scrollbar__wrap {
		-ms-overflow-style: none !important;
	}

	.el-scrollbar__wrap::-webkit-scrollbar {
		display: none;
	}

	.el-scrollbar__wrap li:nth-of-type(1) .tab_tr {
		border-top: 1px solid #ddd;
		background-color: #ddd;
	}

	.tab_tr {
		height: 40px;
		border-bottom: 1px solid #ddd;
		line-height: 40px;
		/* display: flex; */
	}

	.text_org {
		color: #EB6100;
	}

	.container /deep/ tr td:nth-of-type(2) span {
		color: #22ac38;
	}

	.el-pagination__total {
		height: 33px !important;
		line-height: 33px !important;
	}

	.el-input--mini .el-input__inner {
		height: 33px;
	}

	.el-pagination__editor.el-input .el-input__inner {
		height: 33px;
	}

	.page_box {
		display: flex;
		justify-content: flex-end;
		margin-top: 30px;
	}

	.el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	.el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	.el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.btns {
		width: 72px;
		padding: 0;
	}

	.zzc {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
	}


	.ger:hover {
		background: #22ac38;
		color: #fff;
	}

	.loading-content {
		position: absolute;
		z-index: 2000;
		/* background-color: rgba(0, 0, 0, 0.8); */
		margin: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		transition: opacity 0.3s;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		/* width: 200px;
		height: 150px;
		border-radius: 10px; */
	}

	.loading-spinner {
		text-align: center;
	}

	.loading-spinner .circular {
		height: 42px;
		animation: loading-rotate 2s linear infinite;
	}

	.loading-spinner .path {
		animation: loading-dash 1.5s ease-in-out infinite;
		stroke-dasharray: 90, 150;
		stroke-dashoffset: 0;
		/* stroke- 2; */
		stroke: #000;
		stroke-linecap: round;
	}

	.loading-text {
		font-size: 14px;
		color: #000;
	}

	@keyframes loading-rotate {
		100% {
			transform: rotate(360deg);
		}
	}

	@keyframes loading-dash {
		0% {
			stroke-dasharray: 1, 200;
			stroke-dashoffset: 0;
		}

		50% {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -40px;
		}

		to {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -120px;
		}
	}


	.qx:hover {
		/* background: #edf3fd; */
		/* color: #4286f5; */
	}

	/* 	.nosingle:hover {
		background: #d28679;
		color: #fff;
	} */

	.nosingle {
		/* background: #fcf4f2;  */
		color: #d28679;
	}

	/* .waitdoing:hover {
		background: #db9d46;
		color: #fff;
	}
 */
	.waitdoing {
		/* background: #fef6eb; */
		color: #db9d46;
	}

	/* .wait:hover {
		background: #af7087;
		color: #fff;
	} */

	.wait {

		/* background: #fbeff4; */
		color: #af7087;
	}



	.btns .iconfont {
		font-size: 10px;
		transition: all .3s;
		transform: rotateZ(0deg);
		line-height: 26px;
	}



	td,
	th {
		font-size: 14px;
		color: #333;
		/* line-height: 22px; */
		padding: 10px;
		border-top: 0;
		border-bottom: 1px solid #eee;
	}



	.modal {
		position: absolute;
	}

	.modal-dialog {
		height: 97%;
	}

	.modal-header {
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.modal-content {
		/* width: 85%; */
		margin: 0 auto;
		max-height: 100%;
		/* height: 65vh; */
		/* overflow-y: scroll; */
	}

	.cent {
		width: 100%;
		align-items: center;
	}
</style>
